﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <style type="text/css">
    *
    {
        margin:0; padding:0;
    }
    </style>
</head>
<body>
<div id="dBox" style="float:left;width:0px; height:200px; border:solid 1px #000; background-color:#ff0;">
</div>
<div id="dBox2" style="float:right;width:200px; height:200px; border:solid 0px #000; background-color:#ff0;">
</div>
<div style="float:left;width:200px;">
    <input type="button" value="Dong" onclick="javascript:moveDbox()" />
    <input type="button" value="Dong" onclick="javascript:moveDbox1()" />
    <script type="text/javascript">
        moveDbox = function () {
            $('#dBox').animate({ "width": "+=400px" }, "slow");
        }
        moveDbox1 = function () {
            $('#dBox').animate({ "width": "-=400px" }, "slow");
        }
        $(document).ready(function () {
            //$('#dBox2').animate({ "height": $(window).height() }, "slow");
            //alert($(window).height());
            //$('#dBox2').width = $(window).height()+"px";
            $('#dBox2').height($(window).height());
        })
        $(window).resize(function () {
            //$('#dBox2').animate({ "height": $(window).height() }, "slow");
            //alert($(window).height());
            $('#dBox2').height($(window).height());
        })
    </script>
</div>
</body>
</html>
